package classes.multithread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author : DuJiabao
 * @Date : 2021/1/20 15:52
 * @Project : java_learning
 * @File : null.java
 * @Desc :
 */
public class SingleThreadExecutor {
    public static void main(String[] args) {
        ExecutorService exec = Executors.newSingleThreadExecutor();
        for (int i = 0; i < 5; i++) {
            exec.execute(new RunnableTask());
        }
        exec.shutdown();
    }
}
